package com.gxa.activeMQ.repository;

import org.springframework.jms.annotation.JmsListener;
import org.springframework.stereotype.Repository;

@Repository
public class Receiver {

    // 接收消息:  让当前的消费者在一定的通道上监听
    // 从queueA 的通道上监听 - Queue
    @JmsListener(destination = "goodsCache")
    public void receive1(String message){
        System.out.println("receive1从通道queueA中接收:"+message);
    }



    // 从一对多通道上接收
    @JmsListener(destination = "topicA")
    public void receive11(String message){
        System.out.println("receive11从订阅topicA中接收:"+message);
    }


}